Skip to content

Upgrade restate-sdk-shared-core to 8.4.0 - #305

Merged
igalshilman merged 1 commit into
restatedev:mainfrom
igalshilman:claude/shared-core-8.4.0
Nov 9, 2026
Merged

igalshilman merged 1 commit into
restatedev:mainfrom
igalshilman:claude/shared-core-8.4.0

Conversation

@igalshilman

@igalshilman igalshilman commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Bumps restate-sdk-shared-core from 8.3.1 to 8.4.0. The release brings the plain read-through cache for the sessions' state, with unique tail entry names (#113). The features stay the same.

Only Cargo.toml and Cargo.lock change, and no code has to change.

For the release notes, the sessions' state format only goes forward. Every flush in 8.4.0 writes an SH23 head, and 8.4.0 still reads the SH22 heads that ≤1.4.2 wrote. 1.4.2 (shared core 8.3.1) can't read an SH23 head, though. So once a release with this bump has flushed a key's state, rolling back to ≤1.4.2, or an old deployment still serving that key, can't open it. As sdk-shared-core#113 says, there's no compatibility release.

Locally: cargo build is clean and just test-fast gives 352 passed.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No code issues. Two things to note before this ships: the state format becomes one-way, and some docs are now out of date.

Reviewed changes

I reviewed the restate-sdk-shared-core bump against the published 8.3.1 and 8.4.0 crates.

  • Dependency bump: Cargo.toml now asks for 8.4.0 with the same features. The Cargo.lock checksum matches the crates.io tarball. 8.4.0's [dependencies] are the same as 8.3.1's, so no other lockfile entries change.

ℹ️ docs/agents/access-patterns.md describes 8.3.1's reader behavior

The doc says readers never reuse the process's cached state, so every view call fetches the head, the manifest and each tail entry again. With 8.4.0 that stops being true. A reader opened with .cached(...), as src/sessions.rs does, now reads through the PageCache. The new src/state/mod.rs says that "a steady-state open, an owner's or a reader's, and a flush are each one round trip". The measurements were taken at specific commits, so they still hold for those commits. The explanation and the "What to change next" item now point at a limitation upstream has removed.

Technical details
# access-patterns.md: reader cache claims are stale after shared-core 8.4.0

## Affected sites
- docs/agents/access-patterns.md:184-187 — "readers never use the process's state of the namespace (`src/state/mod.rs` in sdk-shared-core skips the cache for them)"
- docs/agents/access-patterns.md:277-279 — "the view pays it on every call, as readers never reuse the process's state"

## Required outcome
- Either scope these statements to 8.3.1 explicitly, or update them to say that from 8.4.0 on, warm reader opens go through the `PageCache` (only the head is uncached). Ideally, re-measure the warm `messages` view with `scripts/access_patterns.py`.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread Cargo.toml
# The feature `sql` is the sessions' storage: the SQLite-compatible database kept in an
# object's state, with its page cache (foyer); `tunnel` is Restate Cloud's.
restate-sdk-shared-core = { version = "8.3.1", features = [
restate-sdk-shared-core = { version = "8.4.0", features = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8.4.0 changes the format of the sessions' state, and the change only works in one direction. Every flush now writes an SH23 head with tail keys named by nonce (v22/tail/<version>-<nonce>/<part>). 8.4.0 still reads the old SH22 heads, but 8.3.1's Head::decode accepts only SH22 and fails with invalid("head"). v1.4.2 already ships sql sessions on 8.3.1. So once a release with this bump flushes a session key, rolling back to ≤1.4.2, or an old deployment still serving that key, can no longer open it. The PR description says nothing about this, and the release notes should say it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct: this was decided in sdk-shared-core#113 ("Older SDKs can't read SH23 heads; no compatibility release at this point"), so this PR can't add a path back. I've added it to the PR description, so it can go into the release notes.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

On the ℹ️ note about docs/agents/access-patterns.md: it's right that from 8.4.0 on, readers go through the read-through cache, and only the head is read each time. The doc's numbers were measured at named commits on 8.3.1, so they still hold for those commits. Updating the explanation needs a new measurement with scripts/access_patterns.py. That's a separate change, so this PR keeps to the bump.


Generated by Claude Code

@igalshilman
igalshilman merged commit 95d2f7d into restatedev:main Nov 9, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants